package com.tsd.system.service;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysSetting;
import com.tsd.system.entity.SysSettingExt;
import com.tsd.system.entity.SysUser;

import java.util.List;
import java.util.Map;

/**
 * 描述：SysSetting服务实现层接口
 *
 * @author david
 * @date 2021/07/15 10:35:26
 */
public interface SysSettingService {

    /**
     * 描述：根据id获取SysSetting
     *
     * @param id
     */
    SysSetting getSysSettingById(Long id) throws Exception;

    /**
     * 描述：根据sid获取SysSetting
     *
     * @param sid
     */
    SysSettingExt queryBySid(String sid) throws Exception;

    /**
     * 描述：根据id删除SysSetting
     *
     * @param id
     */
    void deleteSysSetting(Long id, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新SysSetting
     *
     * @param record
     * @param opUser
     */
    void saveSysSetting(SysSettingExt record, SysUser opUser) throws Exception;

    /**
     * 描述：根据params分页查询SysSetting
     *
     * @param params
     * @param page
     */
    List<SysSettingExt> findSysSettings(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询SysSetting
     *
     * @param params
     */
    List<SysSettingExt> findSysSettings(Map<String, Object> params) throws Exception;

    SysSettingExt getSysSettingByCodeOwnerSid(SysSettingExt query) throws Exception;


    <T> T queryValidSettingByCode(String code, Class<T> clazz) throws Exception;
}
